package com.epam.matchers;

import java.util.regex.Pattern;

import com.epam.resources.Resources;
import com.epam.text_elements.Symbol;

public class SymbolMatcher extends AbstractMatcher {
	private static final Pattern PATTERN = Pattern.compile(
			Resources.getString("SymbMatcherPattern"));

	public SymbolMatcher(String src) {
		super(src);
	}

	public Symbol getNextSymbol() {
		String temp = super.nextStringElement(PATTERN);
		Symbol res;
		if (temp != null) {
			res = new Symbol(temp.charAt(0));
		} else {
			res = null;
		}
		return res;
	}
}
